package com.koocloud.electroplatemanage.mapper;

import com.koocloud.electroplatemanage.pojo.CodeNameResult;
import com.koocloud.electroplatemanage.pojo.DrawNoVo;
import com.koocloud.electroplatemanage.pojo.TypeWorkVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
/**
 * @program: electroplatemanage
 * @description: 图号Mapper接口
 * @author: zww
 * @create: 2020-09-29 15:55
 */
@Mapper
public interface DrawNoMapper {
    //通过pk查询一条记录 delete_flag = "1"
    DrawNoVo selectByPk(String drawNoCode);
    //通过名称查询一条记录
    DrawNoVo selectByName(String name);
    //通过pk查询一条记录  delete_flag = "0"
    DrawNoVo selectByCode(String drawNoCode);
    //查询所有记录
    List<DrawNoVo> selectAllData(DrawNoVo drawNoVo);
    //根据状态进行模糊查询 启用为1 禁用为0
    List<DrawNoVo> selectByDeleteFlag(DrawNoVo drawNoVo);
    //插入一条记录
    int insert(DrawNoVo drawNoVo);
    //批量插入记录
    int batchInsert(List<DrawNoVo> listDrawNoVo);
    //逻辑删除一条记录
    int delete(@Param("drawNoCode")String drawNoCode, @Param("deleteFlag") String deleteFlag);
    //通过pks批量逻辑删除记录
    int batchDeleteByPks(List listPks);
    //修改一条记录
    int update(DrawNoVo drawNoVo);
    //修改一条记录 delete_flag
    int updateFlag(DrawNoVo drawNoVo);
    //查询当天图号记录数
    int selectCurrentDrawNoCount(String date);

    //获取现有的所有图号编码和名称
    List<CodeNameResult> selectDrawNo(String idOrName);
    //获取当前图号表中总数
    int selectAmount();
}
